package com.ynr.common.controller;

import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class CommonController {
	
	//@RequiresRoles({"invoiceInput"})
	@RequestMapping("/pendingInvoice")
	public String pendingInvoice(){
		return "views/webviews/invoice_input/pendingInvoice";
	}
	
	//@RequiresRoles({"invoiceInput"})
	@RequestMapping("/invoiceEnter")
	public String invoiceEnter(){
		return "views/webviews/invoice_input/invoiceEnter";
	}
	
	//@RequiresRoles({"invoiceInput"})
	@RequestMapping("/claimingExpenses")
	public String claimingExpenses(){
		return "views/webviews/invoice_input/claimingExpenses";
	}
	
	//@RequiresRoles({"invoiceInput"})
	@RequestMapping("/invoiceUpload")
	public String uploadInvoice(){
		return "views/webviews/invoice_input/invoiceUpload";
	}
	
	@RequestMapping("/salesUpload")
	public String salesUpload(){
		return "views/webviews/invoice_input/salesUpload";
	}
	
	//@RequiresRoles({"invoiceInput"})
	@RequestMapping("/bankUpload")
	public String bankUpload(){
		return "views/webviews/invoice_input/bankUpload";
	}
	
	//@RequiresRoles({"invoiceInput"})
	@RequestMapping("/salaryUpload")
	public String salaryUpload(){
		return "views/webviews/invoice_input/salaryUpload";
	}
	
	@RequestMapping("/auditVoucher")
	public String auditVoucher(){
		return "views/webviews/invoice_input/auditVoucher";
	}
	
	@RequestMapping("/voucher")
	public String voucher(){
		return "views/webviews/invoice_input/voucher";
	}
	
	@RequestMapping("/trial")
	public String trial(){
		return "views/webviews/invoice_input/trial";
	}
	
	@RequestMapping("/sheet")
	public String sheet(){
		return "views/webviews/invoice_input/sheet";
	}
	
	@RequestMapping("/login")
	public String login(){
		return "views/webviews/commons/login";
	}
	
	@RequestMapping("/unauthorized")
	public String unauthorized(){
		return "views/webviews/commons/unauthorized";
	}
	
	@RequestMapping("/error/{code}")
	public String error(@PathVariable String code){
		return "views/webviews/error/" + code;
	}
	
	@RequiresAuthentication
	@RequestMapping("/home")
	public String home(){
		return "views/webviews/commons/home";
	}
}